home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 24
/
Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso
/
Aminet
/
util
/
cli
/
substpat.readme
< prev
next >
Wrap
Text File
|
1998-03-07
|
1KB
|
30 lines
Short: Regexp-based string substitution tool. Source in C included.
Author: Matthias.Bethke@stud.uni-erlangen.de
Uploader: Matthias.Bethke@stud.uni-erlangen.de
Version: 37.1
Type: util/cli
Requires: regexp.library V38 (util/libs/regexp.lha)
substpat (should have been called "subst" for simplicity but that's already
used by the shell :-( ) can substitute a string for any occurence of a
pattern in a character stream. It reads from stdin and writes to stdout so
it can be used in pipes.
A typical invocation: substpat ^[Aa]ssign ";assign" <s:startup-sequence
This would comment out all lines starting with "assign" in your
startup-sequence and write the resulting file to stdout.
Substituting multiple patterns with different strings requires a pipe:
substpat ^[Aa]ssign ";assign" <s:startup-sequence | substpat "REMOVE ?" ""
(comment out assigns and kill all "REMOVE" keywords)
============================= Archive contents =============================
Original Packed Ratio Date Time Name
-------- ------- ----- --------- -------- -------------
881 482 45.2% 26-Feb-98 16:02:26 substpat.readme
2816 1914 32.0% 26-Feb-98 15:45:50 +substpat
4009 1789 55.3% 26-Feb-98 15:45:34 +substpat.c
250 150 40.0% 26-Feb-98 14:48:02 +SCOPTIONS
-------- ------- ----- --------- --------
7956 4335 45.5% 27-Feb-98 01:46:56 4 files